assume cs:code

code segment

    dw 0h, 1h, 2h, 3h, 4h, 5h, 6h, 7h

    dw 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0

start:

    mov ax, cs
    mov ss, ax ; mov 不能直接操作两个段寄存器
    mov sp, 30h ; 8 * 2 + 16 * 2 = 48 = 30h, 0h ~ 2fh 是数据段和栈段，

    mov bx, 0
    mov cx, 8

s:

    push cs:[bx]
    add bx, 2
    loop s

    mov bx,0
    mov cx,8

s0:

    pop cs:[bx]
    add bx, 2
    loop s0

    mov ax, 4c00h
    int 21h

code ends

end start